import request from '@/utils/request'

// 查询软件著作权信息列表
export function listCopyright(query) {
  return request({
    url: '/system/copyright/list',
    method: 'get',
    params: query
  })
}

// 查询软件著作权信息详细
export function getCopyright(id) {
  return request({
    url: '/system/copyright/' + id,
    method: 'get'
  })
}

// 新增软件著作权信息
export function addCopyright(data) {
  return request({
    url: '/system/copyright',
    method: 'post',
    data: data
  })
}

// 修改软件著作权信息
export function updateCopyright(data) {
  return request({
    url: '/system/copyright',
    method: 'put',
    data: data
  })
}

export function updateStatus(data) {
  return request({
    url: '/system/copyright/status',
    method: 'put',
    data: data
  })
}


// 删除软件著作权信息
export function delCopyright(id) {
  return request({
    url: '/system/copyright/' + id,
    method: 'delete'
  })
}


// 软件著作权按部门统计
export function getSoftwareCopyrightCountByDept(query) {
  return request({
    url: '/system/copyright/dept-count',
    method: 'get',
    params: query
  })
}

// 软件著作权按状态分组统计
export function getSoftwareCopyrightCountByStatus(query) {
  return request({
    url: '/system/copyright/status-count',
    method: 'get',
    params: query
  })
}


export function getSoftwareCopyrightForCard(query) {
  return request({
    url: '/system/copyright/dashboard-card-info',
    method: 'get',
    params: query
  })
}

export function countSoftwareCopyrightsByYear(query) {
  return request({
    url: '/system/copyright/countByYear',
    method: 'get',
    params: query
  })
}

// 软件著作权按状态分组统计
export function countSoftwareCopyrightsByRightsAcquisition(query) {
  return request({
    url: '/system/copyright/countByRightsAcquisition',
    method: 'get',
    params: query
  })
}


export function countSoftwareCopyrightsByApplicationStatus(query) {
  return request({
    url: '/system/copyright/countByApplicationStatus',
    method: 'get',
    params: query
  })
}



